<?php

namespace app\api\service;

use think\Log;

class OutboundService
{
	/**
	 * 拨号
	 * User: Feng
	 * Date: 2020/08/27
	 *
	 */
    public function callbackPhone()
	{
		$sa_user = '102517800';
		$password = '37237925';
		$sa_password = substr(md5($password), 0, 32);
		$url = 'ai.800ing.com:8080/voip/api/jsondata.html?sa_user='.$sa_user.'&sa_password='.$sa_password.'&method=getExtension';
		$result = curl_get($url);
		Log::record('请求结果：'.json_encode($result), 'outbound');
		if (0 === $result['code']) {
			return $result;
		}

		return false;
	}

}
